//---------------------------------------------------------------------------
#include <eic.h>
#include <vcl.h>
#pragma hdrstop

#include "CPCtrl.h"
#include "CTreeX.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
t_TitleColor TitleColor[11] = { { clWhite , clWhite   },
                                { clPurple, clFuchsia },
                                { clBlue  , clAqua    },
                                { clNavy  , clBlue    },
                                { clGreen , clLime    },
                                { clOlive , clYellow  },
                                { clPurple, clFuchsia },
                                { clBlue  , clAqua    },
                                { clNavy  , clBlue    },
                                { clGreen , clLime    },
                                { clOlive , clYellow  } };
//---------------------------------------------------------------------------
// ValidCtrCheck est utilisé pour être sûr que les composants créés ne
// contiennent aucune fonction virtuelle pure.
//

static inline void ValidCtrCheck(CPageControl *)
{
    new CPageControl(NULL);
}
//---------------------------------------------------------------------------
__fastcall CPageControl::CPageControl(TComponent* Owner)
    : TCustomPanel(Owner)
{
  m_EnCoursDeChangement = false;
  m_TitleList = NULL;
  m_pCTree    = NULL;
  m_BtnNext   = NULL;
  m_BtnPrev   = NULL;
  Height      = 300;
  Width       = 300;
  m_nHeader   =  -1;//27;  fixée par le setHeader plus bas
  m_nMargin   =  30;
  m_nSpace    =   5;

  try {
    // Création des composants inclus
    m_TitleList = new TList;
    m_BtnNext   = new TSpeedButton( this);
    m_BtnPrev   = new TSpeedButton( this);
    m_BtnCustom = new TSpeedButton( this);
    m_pComboBox = new TComboBox   ( this);

    // Initialisation des composants inclus
    m_BtnNext->Parent  = this;
    m_BtnPrev->Parent  = this;
    m_BtnNext->Flat    = true;
    m_BtnPrev->Flat    = true;
    m_BtnNext->Visible = false;
    m_BtnPrev->Visible = false;
//    m_BtnNext->Top     = m_nHeader + 2;
//    m_BtnPrev->Top     = m_nHeader + 2;
    m_BtnNext->OnClick = OnClickNext;
    m_BtnPrev->OnClick = OnClickPrev;

//    m_pComboBox->Top        = m_nHeader + 4;
    m_pComboBox->Parent     = this;
    m_pComboBox->OnDropDown = EvComboBoxDropDown;
    m_pComboBox->OnChange   = EvComboBoxChange;
    m_pComboBox->Style      = Stdctrls::csDropDownList;
    m_pComboBox->DropDownCount = 20;
    m_pComboBox->OnKeyDown = EvComboBoxKeyDown;
    m_pComboBox->OnDrawItem = EvComboBoxDrawItemEvent; 

    m_BtnCustom->Parent  = this;
    m_BtnCustom->Flat    = true;
    m_BtnCustom->Visible = false;
//    m_BtnCustom->Top     = m_nHeader + 2;
    m_BtnCustom->Left    = m_nSpace;
    m_BtnCustom->OnClick = OnClickCustomSelect;
    SetHeader( 27);
  } catch( ...) {
  }
}

void __fastcall CPageControl::EvComboBoxKeyDown(TObject *Sender,WORD &Key,TShiftState Shift)
{
  switch (Key)
    {
      case VK_PRIOR:
      case VK_NEXT:
        Key = '\0';
        break;
    }
}
//---------------------------------------------------------------------------
__fastcall CPageControl::~CPageControl()
{
  m_TitleList->Clear();
  // Détruit le TList
  delete m_TitleList;
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::SetHeader( int i)
{
    if( _CodePartenaire==ecp_Fiduciaire_DR) i = 0;
    if( m_nHeader != i)
    {
        m_nHeader = i;
        m_BtnNext->Top     = m_nHeader + 2;
        m_BtnPrev->Top     = m_nHeader + 2;
        m_pComboBox->Top   = m_nHeader + 4;
        m_BtnCustom->Top   = m_nHeader + 2;
    }
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::OnClickNext( TObject *pSender)
{
  if( m_pCTree) m_pCTree->NextItem();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::OnClickPrev( TObject *pSender)
{
  if( m_pCTree) m_pCTree->PriorItem();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::OnClickCustomSelect( TObject *pSender)
{
  if( m_pCTree) m_pCTree->CustomSelect();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::EvComboBoxDrawItemEvent( TWinControl* pWinCtrl, int nIndex, const TRect &eRect, TOwnerDrawState eState)
{
  if( m_pCTree) {
    CForm *pFormList = NULL;;
    if( m_pCTree->GetDBList( NULL, &pFormList)) {
      ASSERT( pFormList);
      if( pFormList->OnComboDrawItem) pFormList->OnComboDrawItem( pWinCtrl, nIndex, eRect, eState);
    }
  }
}
//---------------------------------------------------------------------------
AnsiString __fastcall CPageControl::GetFieldName() const
{
  CNodeInfos *nodeinfos, *nodeinfos_FieldName;
  int         nRecurs     = 0;
  bool        bIsScrListe = IS_LISTE((( CNodeInfos*)m_TitleList->Items[m_TitleList->Count-1])->WindowStyle);

  nodeinfos_FieldName = NULL;
  for( int j=m_TitleList->Count-1; j>=0; j--) {
    nodeinfos = ( CNodeInfos*)m_TitleList->Items[j];
    if( IS_LISTE( nodeinfos->WindowStyle) && ( nodeinfos->FieldName!=EmptyStr)) {
      nodeinfos_FieldName = nodeinfos;
      nRecurs++;
      if(  bIsScrListe && ( nRecurs==2)) break;
      if( !bIsScrListe) break;
    }
  }

  if (nodeinfos_FieldName)
      return nodeinfos_FieldName->FieldName;
  else
    {
        #ifdef _DEBUG
            ShowMessage("Pas de nom de fichier ???");
        #endif
        return EmptyStr;
    }
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::EvComboBoxDropDown( TObject *pSender)
{
  ASSERT( m_pCTree);

  TDBGrid *dbGrid     = m_pCTree->GetDBList( m_pCTree->GetCurrentForm());
  int      nItemIndex = -1;

  TDataSetNotifyEvent pevBeforeScroll;
  TDataSetNotifyEvent pevAfterScroll;

  ASSERT( dbGrid->DataSource);
  ASSERT( dbGrid->DataSource->DataSet);

  TDataSet *pDataSet = dbGrid->DataSource->DataSet;
  TBookmark bmSave   = pDataSet->GetBookmark();

  m_pComboBox->Clear();
  pDataSet->DisableControls();
  pevBeforeScroll = pDataSet->BeforeScroll; pDataSet->BeforeScroll = NULL;
   pevAfterScroll = pDataSet->AfterScroll;  pDataSet->AfterScroll  = NULL;

  while( !pDataSet->Bof) { nItemIndex++; pDataSet->Prior(); }

  AnsiString strFieldName( GetFieldName());

  for(; !pDataSet->Eof; pDataSet->Next())
    m_pComboBox->Items->Add( pDataSet->FieldByName( strFieldName)->DisplayText);

  if( nItemIndex==-1) nItemIndex = 0;
  if( nItemIndex>=m_pComboBox->Items->Count) nItemIndex = m_pComboBox->Items->Count-1;
  m_pComboBox->ItemIndex = nItemIndex;

  pDataSet->GotoBookmark( bmSave);
  pDataSet->FreeBookmark( bmSave);

  pDataSet->BeforeScroll = pevBeforeScroll;
  pDataSet->AfterScroll  = pevAfterScroll;
  pDataSet->EnableControls();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::EvComboBoxChange( TObject *pSender)
{
  TDataSetNotifyEvent AncienAfterScroll,AncienBeforeScroll;
  if (m_EnCoursDeChangement)
    return;
  m_EnCoursDeChangement = true;


  ASSERT( m_pCTree);

  TDBGrid *dbGrid = m_pCTree->GetDBList( m_pCTree->GetCurrentForm());
  AnsiString strBookmark;

  ASSERT( dbGrid->DataSource);
  ASSERT( dbGrid->DataSource->DataSet);

  TDataSet *pDataSet = dbGrid->DataSource->DataSet;
  pDataSet->DisableControls();
  AncienAfterScroll = pDataSet->AfterScroll;
  AncienBeforeScroll = pDataSet->BeforeScroll;
  pDataSet->AfterScroll = NULL;
  pDataSet->BeforeScroll = NULL;
  CEICForm *form = m_pCTree->GetCurrentForm();
  if (!form->CloseQuery())
    {
      int Index = 0,RecNo = pDataSet->RecNo;
      pDataSet->First();
      while (RecNo != pDataSet->RecNo)
        {
          pDataSet->Next();
          Index++;
        }
      m_pComboBox->ItemIndex = Index;
      pDataSet->AfterScroll = AncienAfterScroll;
      pDataSet->BeforeScroll = AncienBeforeScroll;
      pDataSet->EnableControls();
      m_EnCoursDeChangement = false;
      return;
    }
  if (AncienBeforeScroll)
    AncienBeforeScroll(pDataSet);
  strBookmark = pDataSet->Bookmark;
  pDataSet->First();
  for( int i=m_pComboBox->ItemIndex; i>0; i--) pDataSet->Next();

  pDataSet->EnableControls();
  pDataSet->AfterScroll = AncienAfterScroll;
  pDataSet->BeforeScroll = AncienBeforeScroll;

  if (AncienAfterScroll)
    AncienAfterScroll(pDataSet);

  if( !IS_ENABLED( m_pCTree->FindNode( m_pCTree->Selected))) {
    pDataSet->AfterScroll = NULL;
    pDataSet->BeforeScroll = NULL;
    pDataSet->DisableControls();
    int nIndex = 0;
    pDataSet->First();
    while( pDataSet->Bookmark!=strBookmark) {
      pDataSet->Next();
      nIndex++;
    }
    m_pComboBox->ItemIndex = nIndex;
    pDataSet->EnableControls();
    pDataSet->AfterScroll  = AncienAfterScroll;
    pDataSet->BeforeScroll = AncienBeforeScroll;
    if( AncienAfterScroll) AncienAfterScroll( pDataSet);
  }

  m_EnCoursDeChangement = false;
}
//---------------------------------------------------------------------------
AnsiString __fastcall CPageControl::CutString( int nLengthTitleBar, int nXPos, const AnsiString &strText)
{
  bool       bChange = false;
  AnsiString strNewText( strText);

  while( true) {
    if( strNewText.IsEmpty()) return EmptyStr;
    if( Canvas->TextWidth( strNewText)>(nLengthTitleBar-nXPos)) {
      strNewText = strNewText.SubString( 1, strNewText.Length()-1);
      bChange    = true;
    } else {
      if( bChange && ( strNewText.Length()>4)) strNewText = strNewText.SubString( 1, strNewText.Length()-4) + " ...";
      return strNewText;
    }
  }
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::DrawOnglet( int nNumber, const AnsiString &strLevel, int WindowStyle, const AnsiString &strText)
{
  if( !m_nHeader) return;
  TPoint points[5];
  int    header2_5 = m_nHeader * 2 / 5;
  int    header5_9 = m_nHeader * 5 / 9;
  int    shift     = nNumber*m_nMargin;
  int    p, topw, leftl, leftt1, leftt2;
  AnsiString Text1, Text2, strNewLevel;

  points[0] = Point(shift          ,  m_nHeader);
  points[1] = Point(shift          ,  header2_5);
  points[2] = Point(shift+header2_5,          0);
  points[3] = Point(Width - 2      ,          0);
  points[4] = Point(Width - 2      ,  m_nHeader);
  // Dessine un onglet
  Canvas->Brush->Color = clBtnFace;
  Canvas->Pen->Color   = clBtnFace;
  Canvas->Polygon(points, 4);
  // Affchage des bordures ombragées
  Canvas->Pen->Color = clBtnShadow;
  Canvas->MoveTo(points[0].x  , points[0].y  );
  Canvas->LineTo(points[1].x  , points[1].y  );
  Canvas->LineTo(points[2].x  , points[2].y  );
  Canvas->LineTo(points[3].x  , points[3].y  );
  Canvas->LineTo(points[4].x  , points[4].y  );
  Canvas->MoveTo(points[0].x  , points[0].y-1);
  Canvas->LineTo(          0  , points[0].y-1);
  // Affichage des bordures claires
  Canvas->Pen->Color = clBtnHighlight;
  Canvas->MoveTo(points[0].x+1, points[0].y  );
  Canvas->LineTo(points[1].x+1, points[1].y  );
  Canvas->LineTo(points[2].x  , points[2].y+1);
  Canvas->LineTo(points[3].x  , points[3].y+1);
  Canvas->MoveTo(points[0].x  , points[0].y  );
  Canvas->LineTo(          0  , points[0].y  );
  // Dessine l'onglet de la couleur de l'écran
  points[0] = Point(shift+m_nSpace            ,    m_nHeader);
  points[1] = Point(shift+m_nSpace            ,  header5_9-2);
  points[2] = Point(shift+m_nSpace+header2_5-2,     m_nSpace);
  points[3] = Point(Width - m_nSpace - 2      ,     m_nSpace);
  points[4] = Point(Width - m_nSpace - 2      ,    m_nHeader);
  Canvas->Brush->Color = (_CodePartenaire==ecp_Fiduciaire_TP)
                            ? (TColor)0x00006400
                            : TitleColor[WindowStyle].Background;
  Canvas->Pen->Color   = (_CodePartenaire==ecp_Fiduciaire_TP)
                            ? (TColor)0x00006400
                            : TitleColor[WindowStyle].Background;
  Canvas->Polygon(points, 4);
  // Dessine les bordures claires
  Canvas->Pen->Color   = (_CodePartenaire==ecp_Fiduciaire_TP)
                            ? (TColor)0x0000A000
                            : TitleColor[WindowStyle].Border;
  Canvas->MoveTo(points[0].x  , points[0].y  );
  Canvas->LineTo(points[1].x  , points[1].y  );
  Canvas->LineTo(points[2].x  , points[2].y  );
  Canvas->LineTo(points[3].x+1, points[3].y  );
  // Dessine les bordure foncées
  Canvas->Pen->Color   = clBtnShadow;
  Canvas->LineTo(points[4].x+1, points[4].y  );
  Canvas->LineTo(points[0].x+1, points[0].y  );
  // Affiche les textes de l'écran
  if ((p=strText.Pos("\\t"))==0) { Text1 = strText; Text2 = EmptyStr; }
  else { Text1 = strText.SubString(1, p-1); Text2 = strText.SubString(p+2, strText.Length()-p-1); }
  Canvas->Font->Name  =  "System";  // Mise en place de la fonte
  Canvas->Font->Style << fsBold;
  Canvas->Font->Size  =  10;
  leftl  = points[0].x + m_nSpace * 2;
  leftt1 = points[2].x + m_nSpace * 6;
  leftt2 = points[3].x - m_nSpace * 3 - Canvas->TextWidth(Text2);
  topw   = ((points[0].y - points[2].y - Canvas->TextHeight('A')) / 2) + points[2].y;
  Text1       = CutString(points[4].x-points[1].x, leftt1-points[1].x, Text1);
  strNewLevel = CutString(points[4].x-points[1].x, leftl -points[1].x, strLevel);
  if (leftt2 <= (leftt1+Canvas->TextWidth(Text1))) Text2 = EmptyStr;
  Canvas->Font->Color =  clBlack;
  Canvas->TextOut(leftl+1 , topw+1, strNewLevel);
  Canvas->TextOut(leftt1+1, topw+1, Text1);
  Canvas->TextOut(leftt2+1, topw+1, Text2);
  Canvas->Font->Color  = clWhite;
  Canvas->Brush->Style = bsClear;
  Canvas->TextOut(leftl   , topw  , strNewLevel);
  Canvas->TextOut(leftt1  , topw  , Text1);
  Canvas->TextOut(leftt2  , topw  , Text2);
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::Paint()
{
  CNodeInfos   *nodeinfos;
  char          szLevel[2] = { 0, 0 };

  // Dessine le fond uni
  Canvas->Pen  ->Style = psSolid;
  Canvas->Brush->Style = bsSolid;
  Canvas->Brush->Color = clBtnFace;
  Canvas->Pen->Color   = clBtnFace;
  Canvas->Rectangle(0, 0, Width-1, Height-1);
  // Dessine les bordures avant de dessiner les onglets
  if( ((CTree*)Owner)->Visible)
  {
    Canvas->Pen->Color   = clBtnShadow;
    Canvas->MoveTo(0      , Height-1);
    Canvas->LineTo(0      ,        0);
    Canvas->LineTo(Width-1,        0);
    Canvas->Pen->Color   = clBtnHighlight;
    Canvas->LineTo(Width-1, Height-1);
    Canvas->LineTo(      0, Height-1);
  }

  if( _CodePartenaire!=ecp_Fiduciaire_DR) {
    // Dessine tous les onglets
    for(int i=0; i<m_TitleList->Count; i++) {
      nodeinfos  = (CNodeInfos *)m_TitleList->Items[i];
      szLevel[0] = nodeinfos->Level>25 ? ( char)( '0' + ( nodeinfos->Level-25)) : ( char)( 'A' + nodeinfos->Level);
      DrawOnglet(i, AnsiString(szLevel), nodeinfos->WindowStyle, nodeinfos->Text);
    }

    // Dessine les bordures après le dessin des onglets
    if (m_TitleList->Count==0) {
      Canvas->Pen->Color = clBtnHighlight;
      Canvas->MoveTo(      1,   m_nHeader);
      Canvas->LineTo(      1,           2);
      Canvas->LineTo(Width-2,           2);
      Canvas->Pen->Color = clBtnShadow;
      Canvas->LineTo(Width-2,   m_nHeader);
    }

    Canvas->Pen->Color   = clBtnHighlight;
    Canvas->MoveTo(1      ,   m_nHeader);
    Canvas->LineTo(1      ,    Height-1);
    Canvas->Pen->Color   = clBtnShadow;
    Canvas->MoveTo(2      ,    Height-2);
    Canvas->LineTo(Width-2,    Height-2);
    Canvas->LineTo(Width-2, m_nHeader-1);
  }

  // Dessine les boutons
  if( m_pCTree && m_pCTree->DisplayCustomSelectBtn()) {
    m_pComboBox->Left    = m_nSpace + 27;
    m_BtnCustom->Visible = IsScreenListWithDisplayBar();
  } else {
    m_pComboBox->Left    = m_nSpace;
    m_BtnCustom->Visible = false;
  }

  m_BtnNext  ->Left  = Width - m_nSpace - m_BtnNext  ->Width;
  m_BtnPrev  ->Left  = m_BtnNext->Left  - m_BtnPrev  ->Width - m_nSpace;
  m_pComboBox->Width = m_BtnPrev->Left  - m_pComboBox->Left  - 2;

  bool bIsVisible      = IsScreenListWithDisplayBar();
  m_BtnPrev  ->Visible = bIsVisible;
  m_BtnNext  ->Visible = bIsVisible;
  if(/*( m_pComboBox->Visible!=bIsVisible) &&*/ bIsVisible) EvOnDataChange( NULL, NULL);
  m_pComboBox->Visible = bIsVisible;
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::EvOnDataChange(TObject *Sender, TField *Field)
{
  if( !m_pCTree) return;

  TDBGrid *pGrid;

  if(( pGrid=m_pCTree->GetDBList())==NULL) return;

  AnsiString strValue( pGrid->DataSource->DataSet->FieldByName( GetFieldName())->DisplayText);
  int nIndex = m_pComboBox->Items->IndexOf( strValue);
  if( nIndex==-1) nIndex = m_pComboBox->Items->Add( strValue);
  m_pComboBox->ItemIndex = nIndex;
  // Grise ou dégrise les boutons élement suivant et précédent
  m_BtnPrev->Enabled = !pGrid->DataSource->DataSet->Bof;
  m_BtnNext->Enabled = !pGrid->DataSource->DataSet->Eof;
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::AddTitle( CEICForm *pForm, CNodeInfos *nodeinfos)
{
  ASSERT( m_pCTree);
  m_TitleList->Add( nodeinfos);

  CForm *pFormList = NULL;;
  if( m_pCTree->GetDBList( pForm, &pFormList)) {
    ASSERT( pFormList);
    m_pComboBox->Style = pFormList->OnComboDrawItem ? Stdctrls::csOwnerDrawFixed : Stdctrls::csDropDownList;
  }
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::DeleteTitle()
{
  int index = m_TitleList->Count-1;
  if (index < 0) return;

  m_TitleList->Delete(index);
}
//---------------------------------------------------------------------------
bool __fastcall CPageControl::IsScreenListWithDisplayBar()
{
  CNodeInfos *nodeinfos;
  int         nCount;

  if ((nCount=(m_TitleList->Count-1))<0) return false;
  nodeinfos  = (CNodeInfos *)m_TitleList->Items[nCount];
  return (IS_SCR_LISTE(nodeinfos->WindowStyle) && nodeinfos->DisplayBar);
}
//---------------------------------------------------------------------------
int __fastcall CPageControl::GetClientTop()
{
  int value = m_nHeader+2;
  if (IsScreenListWithDisplayBar()) value += (m_BtnPrev->Height+2);
  return (value);
}
//---------------------------------------------------------------------------
int __fastcall CPageControl::GetClientHeight()
{
  int value = Height-m_nHeader-4;
  if (IsScreenListWithDisplayBar()) value -= (m_BtnPrev->Height+4);
  if( m_pCTree && m_pCTree->PageFooter) value -= m_pCTree->PageFooter->Height;
  return (value);
}
//---------------------------------------------------------------------------
int __fastcall CPageControl::GetClientLeft()
{
  return (2);
}
//---------------------------------------------------------------------------
int __fastcall CPageControl::GetClientWidth()
{
  return (Width-4);
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::SetCTree(CTree *pCTree, Graphics::TBitmap *bmpPrev, Graphics::TBitmap *bmpNext, Graphics::TBitmap *bmpCustom)
{
  m_pCTree           = pCTree;

  CreerTransparenceBmp(bmpPrev,
                       bmpPrev->Canvas->Pixels[0][0],
                       Color);
  m_BtnPrev  ->Glyph = bmpPrev;

  CreerTransparenceBmp(bmpNext,
                       bmpNext->Canvas->Pixels[0][0],
                       Color);
  m_BtnNext  ->Glyph = bmpNext;

  CreerTransparenceBmp(bmpCustom,
                       bmpCustom->Canvas->Pixels[0][0],
                       Color);
  m_BtnCustom->Glyph = bmpCustom;


}
//---------------------------------------------------------------------------
int __fastcall CPageControl::DetectOnglet(int xPos, int yPos)
{
  int header2_5 = m_nHeader * 2 / 5;
  int n         = xPos / m_nMargin;
  int xa        = n * m_nMargin + header2_5;

  if (yPos > m_nHeader) return (-1);
  if (yPos <= header2_5) if (xPos <= (xa-yPos)) n--;
  return (n);
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::Draw()
{
  if( m_pCTree) m_pCTree->ChangeCurrentFormPos();
  Invalidate();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::WMWindowPosChanged(TWMWindowPosChanged &Msg)
{
  TCustomControl::Dispatch(&Msg);

  if( ComponentState.Contains( csDestroying)) return;
  if( m_pCTree) m_pCTree->ChangeCurrentFormPos();
}
//---------------------------------------------------------------------------
void __fastcall CPageControl::WMLButtonDown(TWMLButtonDown &Msg)
{
  TCustomControl::Dispatch(&Msg);

  if( ComponentState.Contains( csDestroying)) return;

  int n = DetectOnglet(Msg.XPos, Msg.YPos);
  if ((n<0) || (n >= (m_TitleList->Count-1))) return;

  if( m_pCTree) m_pCTree->SetSelectedScreen((( CNodeInfos*)m_TitleList->Items[n])->Tag);
}
//---------------------------------------------------------------------------
namespace Cpctrl
{
/*
    void __fastcall PACKAGE Register()
    {
        TComponentClass classes[1] = {__classid(CPageControl)};
        RegisterComponents("EIC Outils", classes, 0);
    }
*/
}
//---------------------------------------------------------------------------
